package com.mdlib.helper.module.account.fragments;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.ljlib.help.R;
import com.mdlib.helper.base.BaseTitleFragment;
import com.mdlib.helper.ui.UIHelper;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * Created by librabin on 16/11/24.
 */

public class BindPhoneSuccFragment extends BaseTitleFragment {


    @Bind(R.id.tv_forget_ok)
    TextView mTvForgetOk;

    private String phone;

    public static BindPhoneSuccFragment newInstance(String phone) {
        BindPhoneSuccFragment bindPhoenFragment = new BindPhoneSuccFragment();
        Bundle bundle = new Bundle();
        bundle.putString(UIHelper.PHONE, phone);
        bindPhoenFragment.setArguments(bundle);
        return bindPhoenFragment;
    }


    @Override
    protected int getContentLayoutId() {
        return R.layout.fragment_bind_phone_success;
    }

    @Override
    protected void initBundle(Bundle bundle) {
        super.initBundle(bundle);
        phone = bundle.getString((UIHelper.PHONE));
    }

    @Override
    protected void initView(View rootView) {
        super.initView(rootView);

        setTitle(R.string.bind_tv_title, R.color.white)
                .setTitleBgColor(R.color.myred)
                .setImgLeftListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        getActivity().finish();
                    }
                });
    }

    @OnClick(R.id.tv_forget_ok)
    public void onClick() {
        getActivity().finish();
    }
}
